/**
 * Copyright 2023 json.cn
 */
package com.wisevar.thirdplatform.gateway.model.invoiceorder;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;


@Data
public class InvoiceSubjectItem implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("发票类目名称")
    @NotEmpty(message = "发票类目名称不能为空")
    private String categoryName;

    @ApiModelProperty("金额（含税）（保留两位小数）")
    @NotNull(message = "金额不能为空")
    @Min(value = 0L,message = "金额不能小于{value}")
    private BigDecimal amount;

    @ApiModelProperty("税率（%）（保留两位小数）")
    @Min(value = 0L,message = "税率不能小于{value}")
    private BigDecimal taxRate;

    @ApiModelProperty("税额（保留两位小数）")
    @Min(value = 0L,message = "税额不能小于{value}")
    private BigDecimal taxAmount;

    @ApiModelProperty("规格型号")
    private String specModel;

    @ApiModelProperty("单位")
    private String unit;

    @ApiModelProperty("数量（保留两位小数）")
    @Min(value = 0L,message = "数量不能小于{value}")
    private BigDecimal quantity;

    @ApiModelProperty("单价（保留两位小数）")
    @Min(value = 0L,message = "单价不能小于{value}")
    private BigDecimal unitPrice;

}